|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.ueberdosis.mp3info.id3v2.Helper
Provides some functionality that is necessary for decoding ID3v2
Field Summary |
Fields inherited from interface de.ueberdosis.mp3info.Defines |
DEFAULT_ENCODING, ID3V2_FOOTER_SIZE, ID3V2_FRAME_HEADER_SIZE, ID3V2_HEADER_SIZE, ID3V2_X_HEADER_SIZE, MP3_FRAME_HEADER_SIZE, SUPPORTED_NUMBER_OF_EXTENDED_FLAG_BYTES, testPositions, VERSION |
Constructor Summary | |
Helper()
|
Method Summary | |
static java.lang.String |
arrayToHexString(byte[] bAr)
converts a byte array to a Hex string. |
static java.lang.String |
byteToHexString(byte b)
converts a byte to a Hex string |
static java.lang.String |
byteToHexString(int i)
Converts an unsigned int-wrapped byte to a Hex String i.e. |
static int |
byteToUnsignedInt(byte b)
converts a byte to an unsigned int |
static int |
decodeBytesToInt(byte[] bAr)
|
static long |
pow(long number,
long exp)
|
static byte[] |
reallocateByteBuffer(int size,
byte[] oldBuffer)
creates a new byte array as buffer |
static byte[] |
synchsafe(long value,
int length)
creates a number of synchsafe bytes from a long |
static byte |
unsignedIntToByte(int i)
converts an unsigned int (between 0 and 255) to a byte any value out of range will result in -128!!! |
static long |
unsynchsafe(byte[] b)
creates a long from a number of synchsafe bytes. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Helper()
Method Detail |
public static long unsynchsafe(byte[] b)
b
- any number of bytes together denoting a number not
bigger than can be stored in a long.
public static byte[] synchsafe(long value, int length)
value
- a value.. Sensibly one that fits into the given number
of byteslength
- number of bytes to create.
public static long pow(long number, long exp)
public static int decodeBytesToInt(byte[] bAr)
public static java.lang.String arrayToHexString(byte[] bAr)
public static java.lang.String byteToHexString(byte b)
public static java.lang.String byteToHexString(int i)
public static int byteToUnsignedInt(byte b)
public static byte unsignedIntToByte(int i)
public static byte[] reallocateByteBuffer(int size, byte[] oldBuffer)
size
- number of bytes the new buffer should be bigger than the
oldoldBuffer
- old Buffer
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |